import type { RouteRecordRaw } from 'vue-router';
import { $t } from '@/locales';

function Layout() {
  return import('@/layouts/index.vue');
}

const routes: RouteRecordRaw = {
  path: '/assessment_indicators',
  component: Layout,
  redirect: '/assessment_indicators/month',
  name: 'assessmentIndicators',
  meta: {
    title: '考核指标',
    icon: 'icon_examine',
    auth: 'assessment_indicators',
  },
  children: [
    {
      path: 'kpi',
      name: 'assessmentIndicatorsKPI',
      component: () => import('@/views/dcp/assessment_indicators/month.vue'),
      meta: {
        title: '部门kpi',
        singleMenu: true,
        i18n: $t('route.dcp.managementPlatform.assessmentIndicatorsMonth'),
        auth: 'assessment_indicators_month',
        activeIcon: 'system-point',
      },
    },
    {
      path: 'kpi/details',
      name: 'assessmentIndicatorsKPIDetails',
      component: () => import('@/views/dcp/assessment_indicators/month/details.vue'),
      meta: {
        title: '部门kpi',
        sidebar: false,
        activeMenu: '/assessment_indicators/kpi',
        auth: 'assessment_indicators_month_details',
      },
    },
    {
      path: 'kpi/history',
      name: 'assessmentIndicatorsKPIHistory',
      component: () => import('@/views/dcp/assessment_indicators/month/history.vue'),
      meta: {
        title: '部门kpi-历史记录',
        sidebar: false,
        auth: 'assessment_indicators_month_history',
        activeIcon: 'system-point',
      },
    },
    {
      path: 'month',
      name: 'assessmentIndicatorsMonth',
      component: () => import('@/views/dcp/assessment_indicators/kpi.vue'),
      meta: {
        title: '区县月度评价考核',
        singleMenu: true,
        i18n: $t('route.dcp.managementPlatform.assessmentIndicatorsKPI'),
        auth: 'assessment_indicators_kpi',
        activeIcon: 'system-point',
      },
    },
    {
      path: 'month/details',
      name: 'assessmentIndicatorsMonthDetails',
      component: () => import('@/views/dcp/assessment_indicators/kpi/details.vue'),
      meta: {
        title: '区县月度评价考核详情',
        sidebar: false,
        activeMenu: '/assessment_indicators/month',
        auth: 'assessment_indicators_kpi_details',
      },
    },
    {
      path: 'month/history',
      name: 'assessmentIndicatorsMonthHistory',
      component: () => import('@/views/dcp/assessment_indicators/kpi/history.vue'),
      meta: {
        title: '区县月度评价考核-历史记录',
        sidebar: false,
        auth: 'assessment_indicators_kpi_history',
        activeIcon: 'system-point',
      },
    },
    {
      path: 'quarter',
      name: 'assessmentIndicatorsQuarter',
      component: () => import('@/views/dcp/assessment_indicators/quarter.vue'),
      meta: {
        title: '区县季度评价考核',
        singleMenu: true,
        i18n: $t('route.dcp.managementPlatform.assessmentIndicatorsQuarter'),
        auth: 'assessment_indicators_quarter',
        activeIcon: 'system-point',
      },
    },
    {
      path: 'quarter/summary',
      name: 'assessmentIndicatorsQuarterSummary',
      component: () => import('@/views/dcp/assessment_indicators/quarter/summary.vue'),
      meta: {
        title: '区县季度评价考核汇总',
        sidebar: false,
        auth: 'assessment_indicators_quarter_summary',
        activeIcon: 'system-point',
      },
    },
    {
      path: 'quarter/summary/details',
      name: 'assessmentIndicatorsQuarterSummaryDetails',
      component: () => import('@/views/dcp/assessment_indicators/quarter/summary_details.vue'),
      meta: {
        title: '区县季度评价考核汇总详情',
        sidebar: false,
        auth: 'assessment_indicators_quarter_summary_details',
        activeIcon: 'system-point',
      },
    },
    {
      path: 'quarter/details',
      name: 'assessmentIndicatorsQuarterDetails',
      component: () => import('@/views/dcp/assessment_indicators/quarter/details.vue'),
      meta: {
        title: '区县季度评价考核',
        sidebar: false,
        auth: 'assessment_indicators_quarter_details',
        activeIcon: 'system-point',
      },
    },
    {
      path: 'quarter/history',
      name: 'assessmentIndicatorsQuarterHistory',
      component: () => import('@/views/dcp/assessment_indicators/quarter/history.vue'),
      meta: {
        title: '区县季度评价考核-历史记录',
        sidebar: false,
        auth: 'assessment_indicators_quarter_history',
        activeIcon: 'system-point',
      },
    },
    {
      path: 'quarter/history/details',
      name: 'assessmentIndicatorsQuarterHistoryDetails',
      component: () => import('@/views/dcp/assessment_indicators/quarter/history_details.vue'),
      meta: {
        title: '区县季度评价考核-历史记录详情',
        sidebar: false,
        auth: 'assessment_indicators_quarter_history_details',
        activeIcon: 'system-point',
      },
    },
    {
      path: 'diagrams',
      name: 'assessmentIndicatorsDiagrams',
      component: () => import('@/views/dcp/assessment_indicators/diagrams.vue'),
      meta: {
        title: '分析图',
        singleMenu: true,
        i18n: $t('route.dcp.managementPlatform.assessmentIndicatorsDiagrams'),
        auth: 'assessment_indicators_diagrams',
        activeIcon: 'system-point',
      },

    },
    {
      path: 'newexcelheader',
      name: 'assessmentIndicatorsNewExcelHeader',
      component: () => import('@/views/dcp/assessment_indicators/components/new_excel_header.vue'),
      meta: {
        title: '新建表头',
        sidebar: false,
        activeMenu: '/assessment_indicators',
        auth: 'assessment_indicators_new_excel_header',
      },
    },
    {
      path: 'newexcelbody',
      name: 'assessmentIndicatorsNewExcelBody',
      component: () => import('@/views/dcp/assessment_indicators/components/new_excel_body.vue'),
      meta: {
        title: '新建表',
        sidebar: false,
        activeMenu: '/assessment_indicators',
        auth: 'assessment_indicators_new_excel_body',
      },
    },
  ],
};

export default routes;
